
function Judge(applet,hc,oc,ocn,ho){
	this.applet = applet;
	this.hypothesisConstruction = hc;
	this.objectiveConstruction = oc;
	this.hiddenObj = ho;
	this.objectiveObjName = ocn;
	applet.registerAddListener("AddListenerFunction");
}


function ggbOninit(){

   for(i=0;i<hypothesisConstruction.length;i++){
			applet.evalCommand(hypothesisConstruction[i]);

   }

      for(l=0;l<objectiveConstruction.length;l++){
			applet.evalCommand(objectiveConstruction[l]);
   }


     for(j=0;j<hiddenObj.length;j++){
			applet.setVisible(hiddenObj[j],false);

   }
     for(k=0;k<objectiveObjName.length;k++){
			applet.setVisible(objectiveObjName[k],false);

   }



    setHypothesisFeel(applet);



}

function judge(answer){
	if(applet.exists(answer)){
		var result = answer + "==" + objectiveObjName[0];
		applet.evalCommand(result);
		if(applet.getValueString(applet.getObjectName(applet.getObjectNumber()-1)).indexOf("true")>=0){
			//alert(answer + ": Right");
			return answer + ": Right";
		}else{
			//alert(answer + ": Wrong");
			return answer + ": Wrong";
		}
	}
}

function AddListenerFunction(){
setUserConstructionFeel(applet);
	
	
	
}